﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media.Imaging;

namespace Win8nl.Converters
{
  public class LocalBitmapConverter : IValueConverter
  {
    public object Convert(object value, Type targetType, object parameter, string language)
    {
      var path = value as string;
      return new BitmapImage(new Uri("ms-appx://" + path));
    }


    public object ConvertBack(object value, Type targetType, object parameter, string language)
    {
      return null;
    }
  }
}
